package com.yuanfengerp.Announcement.dao;

import com.yuanfengerp.Announcement.model.Announcement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.Date;


@Repository
@Mapper
public interface IAnnouncementDao {
    //查询系统通知
    ArrayList<Announcement> getAnnouncementList(@Param("pageSize")int pageSize,@Param("offset") int offset);
    //通过标题，创建时间，状态查询系统通知
    ArrayList<Announcement> getAnnouncement(@Param("caption") String caption ,@Param("creation_time") Date creation_time , @Param("status") Integer status ,@Param("notification_id") int notification_id);
    //新增系统通知
    int addAnnouncement(Announcement announcement);
    //保存并发布系统通知
    int publishAnnouncement(Announcement announcement);
    //查看系统通知的标题和内容
    Announcement selectAnnouncementById(@Param("notification_id") int notification_id);
    //修改系统通知
    int updateAnnouncement(Announcement announcement);
}
